package ar.edu.unq.ts.scenes;

import ar.edu.unq.ts.camera.Camera;
import ar.edu.unq.ts.components.Creature;
import ar.edu.unq.ts.components.Mira;
import ar.edu.unq.ts.components.Shooter;
import ar.edu.unq.ts.extra.Prompt;

import com.uqbar.vainilla.GameScene;

public class ShooterLevelScene extends GameScene {
	
	private Camera camera;
	private Prompt prompt;
	private Shooter shoter;
	
	
	public ShooterLevelScene() {
		super();
		this.camera = new Camera();
	}
	
	public void initialize() {
		this.initializeCreatures();
		this.shoter = new Shooter(300, 300, 100);
		this.addComponent(this.shoter);
		this.addComponent(new Mira(-100, -100));
		this.initializePrompt();
	}
	
	
	private void initializeCreatures() {
		for (int i = 0; i < 800; i += 50) {
			for (int j = 0; j < 800; j += 50) {
				this.addComponent(new Creature(i, j));
			}
		}
	}

	private void initializePrompt() {
		double xPrompt = this.getGame().getDisplayHeight() - 50;
		this.prompt = new Prompt(50, xPrompt);
		this.addComponent(this.prompt);
	}

	public Camera getCamera() {
		return camera;
	}
	
	public void prompt(String texto){
		this.prompt.setText(texto);
	}
	
	

}
